﻿using System.Net;

namespace EmbeddedSensorCloud.Plugin.MicroERP
{
    public class ResponseEntity
    {
        #region Constructor

        public ResponseEntity()
        {
            this.Data = null;
            this.StatusCode = HttpStatusCode.BadRequest;
            this.ContentType = "text/html";
        }

        public ResponseEntity(byte[] data, HttpStatusCode statusCode)
        {
            this.Data = data;
            this.StatusCode = statusCode;
            this.ContentType = "application/json";
        }

        public ResponseEntity(byte[] data, HttpStatusCode statusCode, string contentType)
            : this(data, statusCode)
        {
            this.ContentType = contentType;
        }

        #endregion

        #region Properties

        public byte[] Data { get; set; }

        public HttpStatusCode StatusCode { get; set; }

        public string ContentType { get; set; }

        #endregion
    }
}
